# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-plasma
pkgname=khotkeys
pkgver=5.27.10
pkgrel=0
# armhf blocked by extra-cmake-modules
arch="all !armhf !s390x"
url="https://kde.org/plasma-desktop/"
pkgdesc="Key Accelerator Application"
license="GPL-2.0-only AND LGPL-2.0-or-later"
makedepends="
	extra-cmake-modules
	kcmutils5-dev
	kdbusaddons5-dev
	kdelibs4support-dev
	kdoctools5-dev
	kglobalaccel5-dev
	ki18n5-dev
	kio5-dev
	kxmlgui5-dev
	plasma-framework5-dev
	plasma-workspace-dev
	qt5-qtbase-dev
	qt5-qtx11extras-dev
	samurai
	"

case "$pkgver" in
	*.90*) _rel=unstable;;
	*) _rel=stable;;
esac
_repo_url="https://invent.kde.org/plasma/khotkeys.git"
source="https://download.kde.org/$_rel/plasma/$pkgver/khotkeys-$pkgver.tar.xz"
subpackages="$pkgname-doc $pkgname-lang $pkgname-dev"
options="!check" # No tests

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
52815544d51eb3fd89b777fc3092b21997fad3010669d9949d31caeb718ff2a62dba5405300f57591201be6c92451dc2835fc12228f1206536704c64c98d67d8  khotkeys-5.27.10.tar.xz
"
